package com.lxyk.dao.student;

import com.lxyk.domain.StudentVO;
import com.lxyk.domain.StudentVO2;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface TransferDao {

    //转班处理
    @Update("update student set cid=#{oid},transferDate=#{transferDate},record=#{record} where id=#{id}")
    void transferHandler(StudentVO vo);

    //查询当前班级转班信息
    @Select("select * from student,classes where student.cid=classes.id and record is not NULL and cid=#{cid}")
    List<StudentVO> transferByCid(Integer cid);

    //根据条件模糊查询转班学生信息
    List<StudentVO> findTransferByCondition(StudentVO vo);

    //查询当前班级转班人数
    @Select("SELECT count(*) from student,classes where student.cid=classes.id and record is not NULL and cid=#{cid}")
    Integer findCountByCid(Integer cid);
}
